# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: 3ED <krzysztof1987 at gmail dot com>

pkgname=perl-class-load-xs
_pkgname=Class-Load-XS
pkgver=0.10
pkgrel=11
pkgdesc="XS implementation of parts of Class::Load"
arch=('loong64' 'x86_64')
license=('PerlArtistic2')
url="https://metacpan.org/release/Class-Load-XS"
depends=('perl-class-load')
checkdepends=('perl-module-implementation' 'perl-test-fatal' 'perl-test-needs'
              'perl-test-without-module')
options=('!emptydirs')
source=(https://cpan.metacpan.org/authors/id/E/ET/ETHER/Class-Load-XS-${pkgver}.tar.gz)
sha512sums=('16ab845dc393567f0b0e9597eda7d7678b8a41d218823a166bacdfd4dc93e704a6aff98662340b8d7f4d045a60530071bb84ea8da8be5a6930af47722207d126')

build() {
  cd Class-Load-XS-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd Class-Load-XS-$pkgver
  make test
}

package() {
  cd Class-Load-XS-$pkgver
  make DESTDIR="$pkgdir" install
}
